package org.example.est.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * maintain_order
 * @author 
 */
@Data
public class MaintainOrder implements Serializable {
    private Long id;

    /**
     * 商品序列号
     */
    private String serialno;

    /**
     * 订单编号
     */
    private String orderno;

    /**
     * 用户id
     */
    private Long userid;

    /**
     * 型号id
     */
    private Long modelid;

    /**
     * 评估信息id
     */
    private Long evaluateid;

    /**
     * 订金金额
     */
    private BigDecimal subscription;

    /**
     * 实际交易金额
     */
    private BigDecimal price;

    /**
     * 订单状态（1:预约下单,2:支付定金,9:用户取消,10:完成）
     */
    private Integer status;

    /**
     * 是否评论
     */
    private Integer iscomment;

    /**
     * 取消订单的原因
     */
    private String cancelreason;

    /**
     * 创建人
     */
    private Long createduserid;

    /**
     * 修改人
     */
    private Long updateduserid;

    /**
     * 创建时间
     */
    private Date createdtime;

    /**
     * 修改时间
     */
    private Date updatedtime;

    /**
     * 是否删除(0:否,1:是)
     */
    private Integer isdelete;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MaintainOrder other = (MaintainOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSerialno() == null ? other.getSerialno() == null : this.getSerialno().equals(other.getSerialno()))
            && (this.getOrderno() == null ? other.getOrderno() == null : this.getOrderno().equals(other.getOrderno()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getModelid() == null ? other.getModelid() == null : this.getModelid().equals(other.getModelid()))
            && (this.getEvaluateid() == null ? other.getEvaluateid() == null : this.getEvaluateid().equals(other.getEvaluateid()))
            && (this.getSubscription() == null ? other.getSubscription() == null : this.getSubscription().equals(other.getSubscription()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getIscomment() == null ? other.getIscomment() == null : this.getIscomment().equals(other.getIscomment()))
            && (this.getCancelreason() == null ? other.getCancelreason() == null : this.getCancelreason().equals(other.getCancelreason()))
            && (this.getCreateduserid() == null ? other.getCreateduserid() == null : this.getCreateduserid().equals(other.getCreateduserid()))
            && (this.getUpdateduserid() == null ? other.getUpdateduserid() == null : this.getUpdateduserid().equals(other.getUpdateduserid()))
            && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime()))
            && (this.getUpdatedtime() == null ? other.getUpdatedtime() == null : this.getUpdatedtime().equals(other.getUpdatedtime()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSerialno() == null) ? 0 : getSerialno().hashCode());
        result = prime * result + ((getOrderno() == null) ? 0 : getOrderno().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getModelid() == null) ? 0 : getModelid().hashCode());
        result = prime * result + ((getEvaluateid() == null) ? 0 : getEvaluateid().hashCode());
        result = prime * result + ((getSubscription() == null) ? 0 : getSubscription().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getIscomment() == null) ? 0 : getIscomment().hashCode());
        result = prime * result + ((getCancelreason() == null) ? 0 : getCancelreason().hashCode());
        result = prime * result + ((getCreateduserid() == null) ? 0 : getCreateduserid().hashCode());
        result = prime * result + ((getUpdateduserid() == null) ? 0 : getUpdateduserid().hashCode());
        result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode());
        result = prime * result + ((getUpdatedtime() == null) ? 0 : getUpdatedtime().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", serialno=").append(serialno);
        sb.append(", orderno=").append(orderno);
        sb.append(", userid=").append(userid);
        sb.append(", modelid=").append(modelid);
        sb.append(", evaluateid=").append(evaluateid);
        sb.append(", subscription=").append(subscription);
        sb.append(", price=").append(price);
        sb.append(", status=").append(status);
        sb.append(", iscomment=").append(iscomment);
        sb.append(", cancelreason=").append(cancelreason);
        sb.append(", createduserid=").append(createduserid);
        sb.append(", updateduserid=").append(updateduserid);
        sb.append(", createdtime=").append(createdtime);
        sb.append(", updatedtime=").append(updatedtime);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}